<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>引导页1</title>
</head>

<body>
  <style>
    /* ===== CSS 变量定义 ===== */
    :root {
      /* 颜色系统 */
      --primary-color: #165DFF;
      --primary-light: rgba(22, 93, 255, 0.05);
      --primary-dark: rgba(22, 93, 255, 1);
      --background-color: #F7F9FC;
      --white: #FFFFFF;
      --text-primary: #333333;
      --text-secondary: rgba(255, 255, 255, 0.9);
      --accent-yellow: #FFDD55;
      --accent-pink: #FFE0E0;

      /* 人物颜色 */
      --elder-skin: #E0E0E0;
      --adult-skin: #424242;
      --child-skin: #E0E0E0;
      --pants-color: #333333;

      /* 尺寸系统 */
      --container-max-width: 480px;
      --border-radius-sm: 8px;
      --border-radius-md: 16px;
      --border-radius-lg: 24px;
      --border-radius-xl: 32px;
      --border-radius-full: 9999px;

      /* 间距系统 */
      --spacing-xs: 4px;
      --spacing-sm: 8px;
      --spacing-md: 16px;
      --spacing-lg: 24px;
      --spacing-xl: 32px;
      --spacing-2xl: 48px;

      /* 字体系统 */
      --font-family: 'Helvetica', 'Arial', 'PingFang SC', 'Microsoft YaHei', sans-serif;
      --font-size-sm: 14px;
      --font-size-base: 16px;
      --font-size-lg: 18px;
      --font-size-xl: 20px;
      --font-size-2xl: 24px;
      --font-size-3xl: 32px;

      /* 阴影系统 */
      --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
      --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
      --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
      --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

      /* 动画系统 */
      --transition-fast: 0.15s ease;
      --transition-normal: 0.3s ease;
      --transition-slow: 0.5s ease;
    }

    /* ===== 基础样式重置 ===== */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    *::before,
    *::after {
      box-sizing: border-box;
    }

    html {
      font-size: 16px;
      line-height: 1.5;
      -webkit-text-size-adjust: 100%;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    body {
      font-family: var(--font-family);
      background-color: var(--background-color);
      min-height: 100vh;
      color: var(--text-primary);
      overflow-x: hidden;
    }

    /* ===== 工具类 ===== */
    .text-shadow {
      text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    }

    .illustration-shadow {
      filter: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06));
    }

    .btn-hover {
      transition: all var(--transition-normal);
      cursor: pointer;
    }

    .btn-hover:hover {
      transform: translateY(-2px);
      box-shadow: var(--shadow-lg);
    }

    .btn-hover:active {
      transform: translateY(0);
      box-shadow: var(--shadow-md);
    }

    .fade-in {
      opacity: 0;
      animation: fadeIn 1s var(--transition-normal) forwards;
    }

    /* ===== 布局容器 ===== */
    .app-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-between;
      min-height: 100vh;
      max-width: var(--container-max-width);
      margin: 0 auto;
      background: linear-gradient(to bottom, var(--primary-light) 0%, var(--primary-dark) 100%);
      position: relative;
      overflow: hidden;
    }

    .app-container::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
      pointer-events: none;
    }

    /* ===== 主内容区 ===== */
    main {
      width: 100%;
      flex-grow: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: var(--spacing-md);
      padding-top: var(--spacing-xl);
      position: relative;
      z-index: 1;
    }

    /* ===== 插图区域 ===== */
    .illustration-container {
      width: 100%;
      max-width: 320px;
      margin-bottom: var(--spacing-xl);
      position: relative;
      animation: float 3s ease-in-out infinite;
    }

    @keyframes float {

      0%,
      100% {
        transform: translateY(0px);
      }

      50% {
        transform: translateY(-8px);
      }
    }

    /* ===== Logo 区域 ===== */
    .logo-container {
      position: absolute;
      top: 0;
      left: 50%;
      transform: translateX(-50%) translateY(-25%);
      z-index: 10;
      animation: pulse 2s ease-in-out infinite;
    }

    @keyframes pulse {

      0%,
      100% {
        transform: translateX(-50%) translateY(-25%) scale(1);
      }

      50% {
        transform: translateX(-50%) translateY(-25%) scale(1.05);
      }
    }

    .yellow-heart {
      width: 64px;
      height: 64px;
      background: linear-gradient(135deg, var(--accent-yellow) 0%, #FFC107 100%);
      border-radius: 50%;
      opacity: 0.9;
      position: absolute;
      top: -12px;
      left: -12px;
      box-shadow: var(--shadow-md);
    }

    .infinity-icon {
      width: 64px;
      height: 64px;
      position: relative;
      z-index: 1;
      filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    }

    /* ===== 人物插图 ===== */
    .people-illustration {
      position: relative;
    }

    .illustration-bg {
      background: linear-gradient(135deg, var(--white) 0%, #F8F9FA 100%);
      border-top-left-radius: var(--border-radius-xl);
      border-top-right-radius: var(--border-radius-xl);
      height: 160px;
      padding: var(--spacing-lg);
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
      box-shadow: var(--shadow-lg);
      position: relative;
      overflow: hidden;
    }

    .illustration-bg::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-yellow) 50%, var(--primary-color) 100%);
    }

    /* ===== 人物通用样式 ===== */
    .person {
      position: absolute;
      transition: all var(--transition-normal);
    }

    .person:hover {
      transform: translateY(-2px);
    }

    .face {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      margin: 0 auto;
      position: relative;
      box-shadow: var(--shadow-sm);
    }

    .body-shape {
      width: 64px;
      margin: var(--spacing-xs) auto 0;
      border-radius: 25px 25px 0 0;
      position: relative;
      box-shadow: var(--shadow-sm);
    }

    .pants {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      background-color: var(--pants-color);
      border-radius: 0 0 25px 25px;
    }

    /* ===== 老人样式 ===== */
    .elder {
      left: var(--spacing-lg);
      top: var(--spacing-2xl);
      width: 64px;
      height: 128px;
      animation: elderMove 4s ease-in-out infinite;
    }

    @keyframes elderMove {

      0%,
      100% {
        transform: translateY(0px) rotate(0deg);
      }

      50% {
        transform: translateY(-3px) rotate(1deg);
      }
    }

    .elder .face {
      background: linear-gradient(135deg, var(--elder-skin) 0%, #D0D0D0 100%);
    }

    .elder .body-shape {
      height: 80px;
      background: linear-gradient(135deg, var(--elder-skin) 0%, #D0D0D0 100%);
    }

    .elder .pants {
      height: 32px;
    }

    .elder-glasses {
      position: absolute;
      top: 14px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: var(--spacing-xs);
    }

    .glass-lens {
      width: 12px;
      height: 12px;
      background-color: var(--text-primary);
      border-radius: 50%;
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
    }

    /* ===== 成人样式 ===== */
    .adult {
      right: 64px;
      top: var(--spacing-xl);
      width: 64px;
      height: 144px;
      animation: adultMove 3s ease-in-out infinite;
    }

    @keyframes adultMove {

      0%,
      100% {
        transform: translateY(0px) rotate(0deg);
      }

      50% {
        transform: translateY(-2px) rotate(-1deg);
      }
    }

    .adult .face {
      background: linear-gradient(135deg, var(--adult-skin) 0%, #2C2C2C 100%);
    }

    .adult .body-shape {
      height: 96px;
      background: linear-gradient(135deg, var(--adult-skin) 0%, #2C2C2C 100%);
    }

    .adult .pants {
      height: 32px;
    }

    .adult-hand {
      position: absolute;
      top: 20px;
      right: -8px;
      width: 12px;
      height: 12px;
      background-color: var(--text-primary);
      border-radius: 50%;
      box-shadow: var(--shadow-sm);
    }

    /* ===== 女孩样式 ===== */
    .girl-child {
      right: var(--spacing-lg);
      top: 80px;
      width: 48px;
      height: 96px;
      animation: girlMove 2.5s ease-in-out infinite;
    }

    @keyframes girlMove {

      0%,
      100% {
        transform: translateY(0px) rotate(0deg);
      }

      50% {
        transform: translateY(-4px) rotate(2deg);
      }
    }

    .girl-child .face {
      width: 32px;
      height: 32px;
      background: linear-gradient(135deg, var(--child-skin) 0%, #D0D0D0 100%);
    }

    .girl-child .body-shape {
      width: 48px;
      height: 64px;
      background: linear-gradient(135deg, var(--child-skin) 0%, #D0D0D0 100%);
    }

    .girl-child .pants {
      height: 24px;
    }

    .rabbit-ear {
      position: absolute;
      top: -8px;
      right: 0;
      width: 16px;
      height: 16px;
      background: linear-gradient(135deg, var(--accent-pink) 0%, #FFB3BA 100%);
      border-radius: 50%;
      border: 2px solid var(--white);
      box-shadow: var(--shadow-sm);
    }

    /* ===== 男孩样式 ===== */
    .boy-child {
      right: 112px;
      top: 80px;
      width: 48px;
      height: 96px;
      animation: boyMove 3.5s ease-in-out infinite;
    }

    @keyframes boyMove {

      0%,
      100% {
        transform: translateY(0px) rotate(0deg);
      }

      50% {
        transform: translateY(-3px) rotate(-1deg);
      }
    }

    .boy-child .face {
      width: 32px;
      height: 32px;
      background: linear-gradient(135deg, var(--child-skin) 0%, #D0D0D0 100%);
    }

    .boy-child .body-shape {
      width: 48px;
      height: 64px;
      background: linear-gradient(135deg, var(--child-skin) 0%, #D0D0D0 100%);
    }

    .boy-child .pants {
      height: 24px;
    }

    /* ===== 内容区域 ===== */
    .content-section {
      width: 100%;
      background: linear-gradient(135deg, var(--primary-color) 0%, #0F4CFF 100%);
      border-radius: var(--border-radius-xl);
      padding: var(--spacing-lg);
      color: var(--white);
      display: flex;
      flex-direction: column;
      flex-grow: 1;
      box-shadow: var(--shadow-xl);
      position: relative;
      overflow: hidden;
    }

    .content-section::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
      pointer-events: none;
    }

    .title {
      font-size: clamp(1.5rem, 5vw, 2rem);
      font-weight: 700;
      margin-bottom: var(--spacing-lg);
      text-align: center;
      position: relative;
      z-index: 1;
      letter-spacing: -0.025em;
    }

    .description {
      margin-bottom: var(--spacing-xl);
      flex-grow: 1;
      position: relative;
      z-index: 1;
    }

    .description p {
      font-size: var(--font-size-sm);
      line-height: 1.7;
      margin-bottom: var(--spacing-md);
      opacity: 0.95;
      font-weight: 400;
    }

    /* ===== 按钮区域 ===== */
    .button-container {
      margin-top: var(--spacing-xl);
      position: relative;
      z-index: 1;
    }

    .start-button {
      width: 100%;
      background: linear-gradient(135deg, var(--white) 0%, #F8F9FA 100%);
      color: var(--primary-color);
      font-weight: 600;
      padding: var(--spacing-md) var(--spacing-lg);
      border-radius: var(--border-radius-full);
      font-size: var(--font-size-lg);
      box-shadow: var(--shadow-lg);
      border: none;
      cursor: pointer;
      position: relative;
      overflow: hidden;
      transition: all var(--transition-normal);
    }

    .start-button::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
      transition: left 0.5s;
    }

    .start-button:hover::before {
      left: 100%;
    }

    .start-button:focus {
      outline: none;
      box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.3);
    }

    /* ===== 响应式设计 ===== */
    @media (max-width: 375px) {
      .app-container {
        padding: 0 var(--spacing-sm);
      }

      main {
        padding: var(--spacing-sm);
        padding-top: var(--spacing-lg);
      }

      .illustration-container {
        max-width: 280px;
      }

      .content-section {
        padding: var(--spacing-md);
      }

      .title {
        font-size: 1.4rem;
      }

      .description p {
        font-size: 13px;
      }
    }

    @media (max-width: 320px) {
      .title {
        font-size: 1.3rem;
      }

      .description p {
        font-size: 12px;
      }

      .start-button {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-base);
      }
    }

    @media (min-height: 700px) {
      .content-section {
        padding-bottom: var(--spacing-2xl);
      }

      .illustration-container {
        margin-bottom: var(--spacing-2xl);
      }
    }

    @media (min-height: 800px) {
      main {
        padding-top: var(--spacing-2xl);
      }
    }

    /* ===== 动画效果 ===== */
    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(20px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes slideInUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* ===== 可访问性优化 ===== */
    @media (prefers-reduced-motion: reduce) {

      *,
      *::before,
      *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }

    /* ===== 高对比度模式支持 ===== */
    @media (prefers-contrast: high) {
      .content-section {
        background: var(--primary-color);
        border: 2px solid var(--white);
      }

      .start-button {
        background: var(--white);
        border: 2px solid var(--primary-color);
      }
    }

    /* ===== 打印样式 ===== */
    @media print {
      .app-container {
        background: none;
        box-shadow: none;
      }

      .start-button {
        display: none;
      }
    }
  </style>

  <div class="app-container">
    <!-- 主内容区 -->
    <main>
      <!-- 插图区域 -->
      <div class="illustration-container">
        <!-- 黄色心形与无限符号 -->
        <div class="logo-container">
          <div class="yellow-heart"></div>
          <svg class="infinity-icon" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M35.5 40C35.5 32.5294 41.5294 26.5 49 26.5C56.4706 26.5 62.5 32.5294 62.5 40C62.5 47.4706 56.4706 53.5 49 53.5C41.5294 53.5 35.5 47.4706 35.5 40Z"
              fill="#165DFF" stroke="#165DFF" stroke-width="4" />
            <path
              d="M45 40C45 43.867 48.133 47 52 47H54C57.867 47 61 43.867 61 40C61 36.133 57.867 33 54 33H52C48.133 33 45 36.133 45 40Z"
              fill="white" />
            <path d="M45 33L35 23C35 23 35 13 45 13C55 13 55 23 55 23L45 33Z" stroke="#165DFF" stroke-width="4"
              stroke-linecap="round" />
            <path d="M55 33L65 23C65 23 65 13 55 13C45 13 45 23 45 23L55 33Z" stroke="#165DFF" stroke-width="4"
              stroke-linecap="round" />
          </svg>
        </div>

        <!-- 人物插图 -->
        <div class="people-illustration">
          <div class="illustration-bg illustration-shadow">
            <!-- 左侧老人 -->
            <div class="person elder">
              <div class="face"></div>
              <div class="body-shape">
                <div class="pants"></div>
                <div class="elder-glasses">
                  <div class="glass-lens"></div>
                  <div class="glass-lens"></div>
                </div>
              </div>
            </div>

            <!-- 右侧成人 -->
            <div class="person adult">
              <div class="face"></div>
              <div class="body-shape">
                <div class="pants"></div>
                <div class="adult-hand"></div>
              </div>
            </div>

            <!-- 右侧小孩 -->
            <div class="person girl-child">
              <div class="face">
                <div class="rabbit-ear"></div>
              </div>
              <div class="body-shape">
                <div class="pants"></div>
              </div>
            </div>

            <!-- 中间小孩 -->
            <div class="person boy-child">
              <div class="face"></div>
              <div class="body-shape">
                <div class="pants"></div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!-- 蓝色内容区 -->
      <div class="content-section">
        <!-- 标题 -->
        <h1 class="title text-shadow">欢迎使用如果活</h1>

        <!-- 说明文字 -->
        <div class="description">
          <p>
            由于独居者因孤独死亡导致紧急情况发现延迟，以及家属在遗留工作上日益增多的困扰，这种情况逐年增加。
          </p>
          <p>
            消除莫名的焦虑，让独处的日子也充满精彩，请好好使用“如果生活”应用程序。
          </p>
        </div>

        <!-- 按钮区域 -->
        <div class="button-container">
          <button class="start-button btn-hover">
            开始使用
          </button>
        </div>
      </div>
    </main>
  </div>

  <script>
    // 页面加载动画和交互效果
    document.addEventListener('DOMContentLoaded', () => {
      // 获取主要元素
      const mainContent = document.querySelector('main');
      const illustrationContainer = document.querySelector('.illustration-container');
      const contentSection = document.querySelector('.content-section');
      const startButton = document.querySelector('.start-button');

      // 初始化动画
      const initAnimations = () => {
        // 主内容淡入动画
        mainContent.style.opacity = '0';
        mainContent.style.transform = 'translateY(20px)';

        setTimeout(() => {
          mainContent.style.transition = 'all 1s ease';
          mainContent.style.opacity = '1';
          mainContent.style.transform = 'translateY(0)';
        }, 100);

        // 插图容器动画
        setTimeout(() => {
          illustrationContainer.style.animation = 'slideInUp 0.8s ease forwards';
        }, 300);

        // 内容区域动画
        setTimeout(() => {
          contentSection.style.animation = 'slideInUp 0.8s ease forwards';
        }, 500);
      };

      // 按钮交互效果
      const addButtonEffects = () => {
        startButton.addEventListener('mouseenter', () => {
          startButton.style.transform = 'translateY(-2px) scale(1.02)';
        });

        startButton.addEventListener('mouseleave', () => {
          startButton.style.transform = 'translateY(0) scale(1)';
        });

        startButton.addEventListener('mousedown', () => {
          startButton.style.transform = 'translateY(0) scale(0.98)';
        });

        startButton.addEventListener('mouseup', () => {
          startButton.style.transform = 'translateY(-2px) scale(1.02)';
        });

        // 点击按钮效果
        startButton.addEventListener('click', (e) => {
          e.preventDefault();

          // 创建波纹效果
          const ripple = document.createElement('span');
          const rect = startButton.getBoundingClientRect();
          const size = Math.max(rect.width, rect.height);
          const x = e.clientX - rect.left - size / 2;
          const y = e.clientY - rect.top - size / 2;

          ripple.style.cssText = `
                        position: absolute;
                        width: ${size}px;
                        height: ${size}px;
                        left: ${x}px;
                        top: ${y}px;
                        background: rgba(255, 255, 255, 0.3);
                        border-radius: 50%;
                        transform: scale(0);
                        animation: ripple 0.6s linear;
                        pointer-events: none;
                    `;

          startButton.appendChild(ripple);

          setTimeout(() => {
            ripple.remove();
          }, 600);

          // 跳转到引导页2
          window.location.href = '登陆前-引导页2.html';
        });
      };

      // 人物悬停效果
      const addPersonHoverEffects = () => {
        const persons = document.querySelectorAll('.person');
        persons.forEach(person => {
          person.addEventListener('mouseenter', () => {
            person.style.transform = 'translateY(-4px) scale(1.05)';
            person.style.transition = 'all 0.3s ease';
          });

          person.addEventListener('mouseleave', () => {
            person.style.transform = 'translateY(0) scale(1)';
          });
        });
      };

      // 视差滚动效果
      const addParallaxEffect = () => {
        let ticking = false;

        const updateParallax = () => {
          const scrolled = window.pageYOffset;
          const parallax = scrolled * 0.5;

          if (illustrationContainer) {
            illustrationContainer.style.transform = `translateY(${parallax}px)`;
          }

          ticking = false;
        };

        const requestTick = () => {
          if (!ticking) {
            requestAnimationFrame(updateParallax);
            ticking = true;
          }
        };

        window.addEventListener('scroll', requestTick);
      };

      // 性能优化：使用 Intersection Observer 来延迟加载动画
      const addIntersectionObserver = () => {
        const observer = new IntersectionObserver((entries) => {
          entries.forEach(entry => {
            if (entry.isIntersecting) {
              entry.target.style.animationPlayState = 'running';
            }
          });
        }, {
          threshold: 0.1
        });

        // 观察所有需要动画的元素
        const animatedElements = document.querySelectorAll('.person, .logo-container, .content-section');
        animatedElements.forEach(el => {
          el.style.animationPlayState = 'paused';
          observer.observe(el);
        });
      };

      // 初始化所有效果
      initAnimations();
      addButtonEffects();
      addPersonHoverEffects();
      addParallaxEffect();
      addIntersectionObserver();

      // 添加键盘导航支持
      startButton.addEventListener('keydown', (e) => {
        if (e.key === 'Enter' || e.key === ' ') {
          e.preventDefault();
          startButton.click();
        }
      });
    });

    // 添加CSS动画关键帧
    const style = document.createElement('style');
    style.textContent = `
            @keyframes ripple {
                to {
                    transform: scale(4);
                    opacity: 0;
                }
            }
            
            @keyframes slideInUp {
                from {
                    opacity: 0;
                    transform: translateY(30px);
                }
                to {
                    opacity: 1;
                    transform: translateY(0);
                }
            }
        `;
    document.head.appendChild(style);
  </script>
</body>

</html>